package org.kernely.ui.services;


import java.util.Set;

import org.kernely.core.service.KernelyBundle;
import org.kernely.ui.mvp.IKernelyView;
import org.kernely.ui.mvp.KernelyViewPresenterManager;
import org.kernely.ui.mvp.ViewIdentifier;
import org.kernely.ui.utils.KernelyBundleMenu;

import com.vaadin.terminal.Resource;

/**
 * All Kernely bundles must implement this interface.
 */
public interface KernelyUIBundle extends KernelyBundle {

	/**
	 * This function return the menu of the bundle.
	 * @return 
	 *  - The menu of the bundle.
	 *  - null if the bundle does not have menu.
	 */
	public KernelyBundleMenu getMenu();
	
	
	/**
	 * Returns KernelyViewPresenter which contains associations of Presenter/View of a bundle
	 * @return the KernelyViewPresenterManager which contains the associations
	 */
	KernelyViewPresenterManager getViewPresenter();
	
	/**
	 * This method allows to retrieve the icon associated to the bundle.
	 * This icon will be shown, for example, in the administration panel.
	 * The icon should be a 32*32 image.
	 * 
	 * @return a Vaadin Resource refering to the icon.
	 */
	Resource getIcon();
	
	/**
	 * Get the view ID of this bundle's administration page
	 * @return the ID of the view correspondig to the administration
	 */
	Class<? extends IKernelyView> getAdministrationView();
	
	/**
	 * Get the available front pages, which can be set to home page by users.
	 * @return a set containing views.
	 */
	Set<ViewIdentifier> getFrontPages();
	
}
